<?php
	class AppModel extends Model {
		
		
		function validate_date($date, $dateTime = true) {
			if ($dateTime) {
				$date = explode(' ', $date);
			}
			$date = explode('-', $date[0]);
			return checkdate(intval($date[1]), intval($date[2]), intval($date[0]));
		}
	}

?>
